#ifndef _CKRULE_H_
#define _CKRULE_H_



#include <string>

namespace K_Engine
{
    typedef void* (*creobj)(std::string);
    typedef void (*delobj)(void*);
    typedef std::string (*doingwork)(void*, std::string strOtherParams);
        
    class CKRule
    {
    private:
        void *m_dl;
        creobj creo;
        delobj delo;
        doingwork dw;
        std::string m_strRuleName;
        std::string m_strOtherParams;
    
    public:
        CKRule();
        ~CKRule();
        bool LoadLibrary(std::string rule);
        std::string GetRuleName(); 
    
    public:
        void* GetObject(std::string init);
        void DeleteObject(void* obj);
        std::string DoingWork(void* obj);
    };
}

#endif // ! _CKRULE_H_